/**
 * 
 */
package las.dao.impl;

import las.dao.entity.UserEvent;

import org.apache.ibatis.session.SqlSession;

/**
 * @author shayne
 *
 */
public class UserEventDao {
	
	public void save(UserEvent ue, SqlSession session){
		session.insert("insertUserEvent", ue);
	}
	
	public void delete(Integer id, SqlSession session){
		if(id != null) {
			session.delete("deleteUserEvent", id);
		}
	}
	
	public void delete(UserEvent ue, SqlSession session){
		if(ue != null) {
			session.delete("deleteUserEvent", ue.getId());
		}
	}
	
	public UserEvent selectSimpleOne(Integer id, SqlSession session){
		return (UserEvent)session.selectOne("findSimpleUserEventById", id);
	}
	
	public UserEvent selectOne(Integer id, SqlSession session){
		return (UserEvent)session.selectOne("findUserEventById", id);
	}
	
	public void update(UserEvent ue, SqlSession session){
		session.update("updateUserEvent", ue);
	}
	
}
